<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {


    //前置操作方法
    public function _before_indexAction(){
      //判断用户是否登录
        $user_id = session('user_id');
        if(empty($user_id)){
            $this->success('请登录...','Home/login/index',5);
        }
    }

    public function indexAction(){
       $this->display();
    }

    public function headerAction(){
        $this->display(APP_PATH."/Home/View/header.html");
    }
    public function leftAction(){
        $this->display(APP_PATH."/Home/View/left.html");
    }
    public function mianAction(){
        $this->display();
    }
    public function footerAction(){
        $this->display(APP_PATH."/Home/View/footer.html");
    }
}